package com.suoluo.zenadmin.vo.home;

import java.sql.Timestamp;
import java.util.ArrayList;
import java.util.List;

public class HomeCategoryVO implements Comparable<HomeCategoryVO>{

	/**
	 * 首页的类别编号
	 */
	private int categoryId;
	/**
	 *特色类别编号
	 *新闻：-1
	 *目的地探索:-2
	 *酒店精选:-3
	 */
	private int featureCategoryId;
	
	private String categoryName;
	
	private Timestamp categoryUpdateTime;
	
	private List<HomeItemPortalVO> homeItems;

	public int getFeatureCategoryId() {
		return featureCategoryId;
	}

	public void setFeatureCategoryId(int featureCategoryId) {
		this.featureCategoryId = featureCategoryId;
	}

	public String getCategoryName() {
		return categoryName;
	}

	public void setCategoryName(String categoryName) {
		this.categoryName = categoryName;
	}

	public Timestamp getCategoryUpdateTime() {
		return categoryUpdateTime;
	}

	public void setCategoryUpdateTime(Timestamp categoryUpdateTime) {
		this.categoryUpdateTime = categoryUpdateTime;
	}

	public List<HomeItemPortalVO> getHomeItems() {
		return homeItems;
	}

	public void setHomeItems(List<HomeItemPortalVO> homeItems) {
		this.homeItems = homeItems;
	}
	
	
	public void addHomeItem(HomeItemPortalVO itemVO){
		if (this.homeItems == null){
			homeItems = new ArrayList<HomeItemPortalVO>();
		}
		homeItems.add(itemVO);
	}

	@Override
	public int compareTo(HomeCategoryVO o) {
		return -this.categoryUpdateTime.compareTo(o.categoryUpdateTime);
	}

	public int getCategoryId() {
		return categoryId;
	}

	public void setCategoryId(int categoryId) {
		this.categoryId = categoryId;
	}
	
}
